package Tools.FunctionInterface;

import java.util.Locale;
import java.util.function.Consumer;

public class ConsumerTest {
    public static void main(String[] args) {
        fun(s -> {
            System.out.println(s.toUpperCase());
        });

        fun1(s -> {
            System.out.println(1);
        },s -> {
            System.out.println(1);
        });
    }



    private static void fun(Consumer<String> consumer){
        String str = "Hello World";
        consumer.accept(str);

    }

    private static void fun1(Consumer<String> c1,Consumer<String> c2){
        String str = "Hello World";
        c1.andThen(c2).accept(str);

    }
}
